﻿Option Explicit On
Public Class frmReg

    Dim pFrom As frmMain

    Private Sub cmdCancel_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles cmdCancel.Click
        Me.Close()
    End Sub

    Private Sub frmReg_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
        txtName.Text = pFrom.lstSection.SelectedItem
        Me.TopMost = True
    End Sub

    Private Sub cmdReg_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles cmdReg.Click

        cReg.GeneralRegNewUnit(pFrom, txtName.Text, cboSection.Text)
        Me.Close()

    End Sub

    Public Sub New(ByVal ParentForm As frmMain)

        ' 此调用是 Windows 窗体设计器所必需的。
        pFrom = ParentForm
        InitializeComponent()

        ' 在 InitializeComponent() 调用之后添加任何初始化。

    End Sub

End Class